package shop;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import org.springframework.stereotype.Component;

@Component("console")
public class SystemConsole implements Console {

	public void printf(String format, Object... args) {
		System.out.printf(format, args);
	}

	public void println(String msg) {
		System.out.println(msg);
	}

	public String readLine() {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			return br.readLine();
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
	}

}
